<%@ page language="java" pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="ww" uri="webwork" %>
<ww:bean name="'com.css.apps.base.dict.service.DictMan'" id="dictID" />
<form class="form-horizontal table-form" name="dirslog_form"  id="dirslog_form" action="clientInfoOnDayJob.action" onsubmit="return searchFw(this)">
    <input type="hidden" name="page.orderFlag" class="order-flag" value="<ww:property value='page.orderFlag'/>"> 
	<input type="hidden" name="page.orderString" class="order-string" value="<ww:property value='page.orderString'/>">
	<input type="hidden" name="page.pageSize" class="page-size" value="<ww:property value='page.pageSize'/>">
	<input type="hidden" name="page.totalPages" class="page-count" value="<ww:property value='page.totalPages'/>">
	<input type="hidden" name="page.currentPage" class="page-current" value="<ww:property value='page.currentPage'/>">
	<div class="table-header">
		<div class="tableschfild">
			<div class="tableschcon">
				<div class="table-search">
				<input type="radio" name="logType" class="day" value = "1" onclick="getSelfDatepicker(this)" checked="checked">按日查询
				<input type="radio" name="logType" class="month" value = "2" onclick="getSelfDatepicker(this)">按月查询
				<input type="radio" name="logType" class="year" value = "3" onclick="getSelfDatepicker(this)">按年查询
				<input type="radio" name="logType" class="jd" value = "4" onclick="getSelfDatepicker(this)">按季度查询
				</div>
				<div class="table-search">
				<ul id="queryUl" style="float: left;">
					<li class="day" style="display:none;">按日查询：<input class="input-small Wdate" id="count_key" name="countKey" readonly="true" type="text" 
				    onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'%y-%M-{%d-1}'})"> 
				  	</li>
					<li class="month" style="display:none;">按月查询：<input class="input-small Wdate" id="count_key" name="countKey" readonly="true" type="text" 
				    onclick="WdatePicker({dateFmt:'yyyy-MM',maxDate:'%y-{%M-1}'})"> 
				  	</li>
				  	<li class="year" style="display:none;">按年查询：<input class="input-small Wdate" id="count_key" name="countKey" readonly="true" type="text" 
				    onclick="WdatePicker({dateFmt:'yyyy',maxDate:'{%y-1}'})"> 
				  	</li>
				  	<li class="jd" style="display:none;">按季度查询：<input class="input-small Wdate" id="count_key" name="countKey" readonly="true" type="text" 
				    onclick="WdatePicker({dateFmt:'yyyy-M',isQuarter:true,disabledDates:['....-0[5-9]-..','....-1[0-2]-..'],startDate:'%y-01-01',maxDate:'%y-%M-%d'})">
				  	</li>
				</ul>
				<ul>
					<li id="simpleSearchBtn"><ww:button css="btn green" caption="查询" funcode="oa_sw/dirSw" type="submit"></ww:button></li>
				</ul>
				</div>
			</div>
		</div>
	</div>
	<table class="table table-bordered">
		<thead>
			<tr>
				<th width="60px">IE6</th>
				<th width="60px">IE7</th>
				<th width="60px">IE8</th>
				<th width="60px">IE9</th>
				<th width="60px">IE10</th>
				<th width="60px">IE11</th>
				<th width="60px">Chrome</th>
				<th width="60px">Firefox</th>
				<th width="60px">其他</th>
				<th width="60px"><a href="swStatChart.action" rel="TJTB" target="cssTab" refresh="true" title="统计图表">详情</a></th>
			</tr>
		</thead>
		<!-- 遍历从后台获取的数据 -->
		<!--<tbody>
			<ww:iterator value="page.results" id="data" status="rowstatus"> 
				<ww:set name="record" value="page.results[#rowstatus.index]"/>
				<tr swId="<ww:property value='#record[8]'/>" title="<ww:property value='#record[13]'/>">
					<td class="text-center"><ww:property value="#rowstatus.index+1"/></td>
					<td ><ww:property value="#record[9]"/>〔<ww:property value="#record[10]"/>〕<ww:property value="#record[11]"/>号</td>
					<td ><a  target="cssTab" css="btn"  rel="<ww:property value='#record[8]'/>"  title="<ww:property value='#record[13]'/>" href="getSwSearch.action?uuid=<ww:property value='#record[8]'/>" ><div class="list_title"><ww:property value="#record[13]"/></div></a></td>
					<td class="text-center">
						<ww:if test="#record[12] == ''">普通</ww:if>
						<ww:else><ww:property value="#dictID.getDictType('fw_d_emergency_type',#record[12]).name" /></ww:else>
					</td>
					<td class="text-center"><ww:property value="#dictID.getDictType('fw_d_security_level',#record[14]).name" /></td>
					<td class="text-center"><ww:property value="new java.text.SimpleDateFormat('yyyy-MM-dd').format(#record[7])" /></td>
					<td class="text-center"><ww:property value="#dictID.getDictType('fw_d_complete_type',#record[16]).name" /></td>
					<td class="text-center"><ww:property value="#dictID.getDictType('sw_d_type',#record[15]).name"/></td>
				</tr>
			</ww:iterator> 
		</tbody>-->
		
		<tbody>
		  <ww:iterator value="page.results" id="data1" status="data1">
			<tr>
				<ww:set name="exinfo" value="page.results[#data1.index]"/>
				<td>
					<ww:property value="#exinfo.getIe6()"/>
				</td>
				<td>
					<ww:property value="#exinfo.getIe7()"/>
				</td>
				<td>
					<ww:property value="#exinfo.getIe8()"/>
				</td>
				<td>
					<ww:property value="#exinfo.getIe9()"/>
				</td>
				<td>
					<ww:property value="#exinfo.getIe10()"/>
				</td>
				<td>
					<ww:property value="#exinfo.getIe11()"/>
				</td>
				<td>
					<ww:property value="#exinfo.getChrome()"/>
				</td>
				<td>
					<ww:property value="#exinfo.getFirefox()"/>
				</td>
				<td>
					<ww:property value="#exinfo.getOther()"/>
				</td>
			</tr>
			</ww:iterator>
		</tbody>
	</table>
	<div class="pagination"> <ww:property value="page.pageSplit"/></div>
</form>

<script>
//using('datepicker');

/* function resetswForm(){
	var $tab = $.cssTab.focus();
	$tab.find(':input','#dirsw_form').not(':button, :submit,:radio, :reset, :hidden') .val('') .removeAttr('checked').removeAttr('selected');
	$tab.find('input[type=radio][value=or]').attr('checked','checked');
} */

$(function(){
	//默认选中按日选
	var inputs = $('input[type="radio"]');
	for(var i = 0; i < inputs.length; i++){
		if($(inputs[i]).attr('checked')){
			getSelfDatepicker(inputs[i]);
		}
	}
});

function getSelfDatepicker(selfClass){
	//把非当前选中的input值改为空
	
	var myClass = $(selfClass).attr('class');
	var myli = $("ul[id='queryUl']>li."+myClass);
	var otherLis = $("ul[id='queryUl']>li[class!="+myClass+']');
	for(var i = 0; i < otherLis.length; i++){
		var currentLi = otherLis[i];
		$(currentLi).css("display","none");
		$('input',currentLi).val("");
	}
	myli.css("display","inline");
}

</script>
<!--<script type="text/javascript">using('sw')
</script>-->